GNUH8 v0903

October 5th, 2009

KPIT Cummins Infosystems Limited is releasing the GNUH8 v0903 toolchain, which is a cross compiler tool for Renesas 

(formerly Hitachi and Mitsubishi) H8 series of microcontrollers.

SALIENT FEATURES:

1.   

The GNUH8 v0903 toolchain is based on gcc-4.4.1 [released], binutils-2.19.1 [released], newlib-1.17.0 [released] and gdb-6.8.50 [dated 27th March 2009].

2.

The latest patches are applied to the gcc, binutils and newlib sources. Please visit the following link for the patches applied to the GNUH8 toolchain, http://www.kpitgnutools.com/phpmyfaq/index.php?aktion=artikel&rubrik=001005&id=42&lang=en 

3. The GNUH8 v0903 ELF toolchain supports integration with the KPIT GNU Eclipse v1.1.0 and later. KPIT GNU Eclipse is an Eclipse based Integrated Development Environment (IDE) providing a user interface to the KPIT GNUH8 ELF toolchains (for Windows and Linux).
KPIT GNU Eclipse complements the Renesas HEW IDE and offers users more options for development.
Please visit the following link for more information on KPIT GNU Eclipse,
http://www.kpitgnutools.com/releaseNotes.php?view=RNDET&RN=365
4. A new 'optimize' attribute has been added from GCC-4.4 onwards to allow programmers to change the optimisation level and particular optimisation options for an individual function.
Sample use of this attribute is shown below,
int foo(int i) __attribute__((optimize("-O3")));

ABOUT GNUH8 v0903:

Release version:

GNUH8 v0903

Release Date:

October 5th, 2009

Platforms Supported:

Red Hat GNU/Linux v8.0 or later (or compatible distribution)
Windows NT/2000/XP/Vista

NOTE: The GNUH8 v0903 ELF toolchain works on Windows 7. No issues have been observed on this platform. Windows 7 is not yet officially supported, however.

Language:

C, C99, C++

Targets:

H8/300

 

H8/300L 

 

H8/300H

 

H8/300H Tiny Series

 

H8/S 2XXX

 

H8/S 26XX

 

H8/SX

Object File Format:

ELF

 

CHANGES IN THIS RELEASE:

This section describes the enhancements made and the issues fixed in the v0903 release.

GCC:

1.

Global variables declared as extern in other files, could not be viewed while debugging using GDB.

This bug has now been fixed.

The following is a test case for the same.

//file global.c

#include <stdio.h>

int iCount=20;

 

void Calculate(int iCountb)

{

    printf("%d\n", iCountb);

}

 

// file main.c

#include <stdio.h>

extern void Calculate(int iCountb);

extern int iCount;

 

int main()

{

    int iCounta=20, iCountb;           

    iCountb = iCounta + iCount;    // Value of iCount variable could   

                                   // not be viewed here

    Calculate(iCountb);

    return 0;

}

2.

When the compiler option, '-fomit-frame-pointer' was used along with '-O2' for the H8SX target, the compiler did not pass the return value correctly to the calling function.
This bug has now been fixed.
The following is a test case for the same.


long foo(long p, long q, short r, short* s, long* t)

{
    *s = 25;
    *t = 77;
    return 0;
}


long bar(long p1, long p2, short p3)
{
    short var1;
    long var2 = 0x60;

    foo(p1, p2, p3, &var1, &var2);
    return var2;
}

#include <stdio.h>
volatile long result;
int main(void)
{
    result = 0x00;
    result = bar(1,2,3);
    printf("Value is %lu\n\n", result); // Incorrect result returned here
    return 0;
}

HEW (For Windows OS only):

1.

Use of the Flash Development Tool (FDT) plug-ins under HEW is deprecated. Hence, users are advised to download the latest version of the FDT application and use it independently for Flash downloads.

 

KNOWN LIMITATIONS IN H8-ELF:

This section describes the known problems in this release. We intend to fix these issues in future releases.

We occasionally release maintenance packs for critical bug fixes.

 

Windows and GNU/Linux:

1.

The following code when compiled for H8300H, H8300HN, H8S, H8SN, H8SX, and H8SXN targets with optimisation option '-O1' or above, generates incorrect assembly code.

unsigned int ReadWordx86Style(unsigned long lAddr)
{
unsigned char baBuff[2];
baBuff[0x00]=*((unsigned char *)((unsigned int)(lAddr+1)));
baBuff[0x01]=*((unsigned char *)((unsigned int)(lAddr+0)));
return((*(unsigned int *)baBuff));
}

int start(void)
{
unsigned char baBuff[256];
unsigned int wResult;
wResult = ReadWordx86Style((unsigned long)((unsigned int)baBuff));
return(wResult);
}

2.

The '.tinybss' implementation does not work as expected.

3.

The GNUH8 assembler (h8300-elf-as) does not give error if attribute of a section is not specified.

4.

The 'scanf' and 'sscanf' functions of newlib do not work for H8300HN, H8SN and H8SXN targets when '-mint32' is passed to the compiler.

5.

Library Generator: Please visit the following link for the known issues and limitations related to this utility,
http://www.kpitgnutools.com/phpmyfaq/index.php?aktion=artikel&rubrik=001002&id=413&lang=en

 

HEW (For Windows OS only):

1.

In HEW, when optimised libraries are used in C++ projects, the linker generates "undefined references" error for some ANSI C library functions as they are not implemented.

Workaround:
Users can add their own implementation of these functions or can provide dummy routines depending upon the usage.

2.

The 'Generate Makefile' feature is currently not supported in HEW.

3.

For other limitations pertaining to the single interface for the compiler, assembler, linker and library generator, please visit the following link,
http://www.kpitgnutools.com/phpmyfaq/index.php?aktion=artikel&rubrik=003001&id=445&lang=en

 NOTE:

Windows and GNU/Linux:

1. 

The optimised libraries provided along with the newlib libraries in the toolchain do not require a separate download.

2.

The optimised libraries ('liboptm.a' and 'liboptc.a') are not provided under GNU GPL. The source code of these optimised libraries is neither released nor available on request.

3.

The "libgen" utility is not provided under GNU GPL. The source code of the "libgen" utility is neither released nor available on request.

 

        For free technical support please register at http://www.kpitgnutools.com/
        For your feedback and suggestions please visit http://www.kpitgnutools.com/feedback.php